import React from 'react';
import Nodata from '../../../../../assets/busi/OperatePlatform/nodata.png'; //暂无数据
import Respire from '../../../../../assets/busi/OperatePlatform/unopen.png'; //敬请期待

import PropTypes from 'prop-types';
//分别保留两种的形式 一个是暂无数据，一个是敬请期待
class NoData extends React.Component {
  static defaultProps = {
    title: '暂无数据', //类型
    width: '76px',
    height: '52px',
  };
  render() {
    const { title, width, height } = this.props;
    return (
      <div style={{ height: '100%', width: '100%', display: 'flex', flexDirection: 'column', alignItems: 'center', justifyContent: 'center' }}>
        {!title || title != '敬请期待' ? (
          <>
            <img src={Nodata} />
            <span style={{ display: 'block', fontSize: '12px', color: 'rgba(0, 0, 0, 0.45)', fontWeight: '400' }}>{title}</span>
          </>
        ) : (
          <>
            <img src={Respire} style={{ width: width, height: height }} />
            <span style={{ display: 'block', fontSize: '12px', color: 'rgba(0, 0, 0, 0.45)', fontWeight: '400' }}>敬请期待</span>
          </>
        )}
      </div>
    );
  }
}
NoData.propsTypes = {
  title: PropTypes.string, //类型
};
export default NoData;
